package com.aop_for_springboot;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName: AopController
 * @Author: ZhangYue26
 * @Description: 测试AOP的Controller  访问：http://127.0.0.1:12345/Demo/aop/test?name=Tom&age=18
 * @Date: 2020-11-05
 */
@Controller
@RequestMapping("/aop")
public class AopController {

    @SysLog("测试注解")
    @GetMapping("/test")
    @ResponseBody
    public String test(@RequestParam("name") String name, @RequestParam("age") int age){
        return name + "," + age;
    }
}
